Photocontroller and/or lamp with photocontrols to control operation of lamp

ABSTRACT

A system to control solid state light sources, including a photosensor responsive primarily to wavelengths of light outside the emitted light band of wavelengths that the solid state light sources emit when the solid state light sources are in the ON state, and which produces a light level signal representative of a level of sensed light primarily for wavelengths outside of the emitted light band of wavelengths. A set of circuitry receives the light level signal representative of the sensed level of light from the photosensor, determines a contribution by the solid state light sources to the sensed level of light, and uses a compensated light level or a compensated threshold in assessing a dusk condition or a dawn condition when the solid state light sources are in the ON state to compensate for the contribution by the solid state light sources to the sensed level of light.

TECHNICAL FIELD

The present application is directed to a photocontroller and/or a lampwith photocontrols operable to control operation of the lamp.

BACKGROUND Description of the Related Art

Conventional photocontrollers (commonly referred to as “photocontrols”)for many types of outdoor luminaires require a window or other opticalport to detect ambient daylight. This is because the luminaire produceslight in the visible spectrum which may reflect off of the interiortransparent surfaces of the sealed lens, or light output window, andrepresent a light level higher than the ambient light during the day ornight. This, along with a high light level produced by the light outputof the luminaire, may cause the ambient light detector to be unable todetect the low ambient light level at near dawn, or even the light levelduring the daytime, and cannot therefore turn off the luminaire duringthe day as desired.

Typically, a luminaire will be turned on by a photocontroller at nightand turned off during the day. In a conventional photocontroller, arelay in the photocontroller switches power to the luminaire. In somecases, such as the AreaMax™ luminaires from Evluma (Renton, Wash.),software periodically reads a voltage output by the photocontroller andoutputs a signal to other software elements which control the luminaireindicating whether it is day or night. In dusk or dawn (i.e., twilight)periods, the ambient light level may fluctuate due to environmentalconditions (e.g., wind, clouds, other luminaires, car headlights, etc.).This may cause the luminaire to flicker and/or repeatedly turn on andoff due to fluctuating light levels.

BRIEF SUMMARY

Disclosed embodiments provide a photocontroller for a lamp which is tobe installed in the light emitting chamber (i.e., refractor or lens) ofa luminaire and which can measure the outside ambient light at dawn,daytime, dusk, and nighttime levels without substantial interferencefrom the light produced by the lamp and without the need for an externalwindow for receiving light, e.g., a window positioned on the exterior ofthe luminaire.

In disclosed embodiments, a photodiode, phototransistor,photo-integrated circuit, or other photosensor, is positioned such thatlight from outside of the luminaire falls upon a sensitive area of thephotosensor. In disclosed embodiments, the photosensor is specificallysensitive to light wavelengths longer than the longest wavelength outputby the light source of the luminaire and/or has an optical filter toabsorb and/or reflect the shorter wavelengths. In disclosed embodiments,the photosensor, with or without an optical filter, may be sensitive tolight wavelengths shorter than the short wavelength of light emitted bythe lamp, or longer than the long wavelength of light emitted by thelamp.

In disclosed embodiments, software of the photocontroller or luminairemay provide a state machine to determine the output signal during duskand dawn periods to prevent the luminaire from flickering or repeatedlyturning on and off due to fluctuating light levels.

In other disclosed embodiments the photosensor may output values of alight level signal, e.g., based on an output voltage level, which arestored in memory for some period of time and used to compute the solartime of day. The computed time of day may be used to recalibrate a realtime clock (RTC) circuit, or RTC software algorithm, within theluminaire. The recalibrating of the RTC is to account for long-termdrift in the RTC and/or to re-establish the local time-of-day after apower failure. The RTC time is used by software, such as FailSafe™ fromEvluma, to control the light output of the luminaire in the event of thefailure of an external primary photocontroller. The photosensor and/orthe microcontroller may calibrate a RTC, realized in hardware orsoftware, to enable operation of software in the luminaire whichcontinues proper day/night control and/or scheduled dimming of the lightoutput, e.g., in the event of power failure or failure of thephotocontroller, without requiring the use of a battery.

A photocontroller, for use with a luminaire and one or more solid statelight sources that cumulatively emit light across an emitted light bandof wavelengths, may be summarized as including at least one photosensorpositioned to detect light in an external environment that is externalto the luminaire and responsive primarily to wavelengths of lightoutside the emitted light band of wavelengths that the solid state lightsource emit and which produces a light level signal representative of alevel of light in the external environment primarily for wavelengthsoutside of the emitted light band of wavelengths; and a microcontrollercommunicatively coupled to the at least one photosensor to receive thelight level signal representative of a level of light in the externalenvironment primarily for wavelengths outside of the emitted light bandof wavelengths, the microcontroller operable to determine an externallight condition based at least in part on the light level signal and toproduce a control signal to control an operation of the one or moresolid state light sources based at least in part on the determination ofthe external light condition.

The photocontroller may further include the microcontroller beingoperable to compute a time of day based at least in part on the lightlevel signal; recalibrate a real time clock of the luminaire based onthe computed time of day; and use the real time clock to controloperation of the one or more solid state light sources in an event offailure of the photocontroller.

A lamp for use in a luminaire may be summarized as including a housinghaving an exterior, an interior, and a base to communicatively couple toa socket of the luminaire; one or more solid state light sources thatcumulatively emit light across an emitted light band of wavelengths; anda photocontroller to control operation of the one or more solid statelight sources, the photocontroller having a set of circuitry housed inthe interior of the housing, the set of circuitry including: at leastone photosensor positioned to detect light in an external environmentthat is external to the luminaire and responsive primarily towavelengths of light outside the emitted light band of wavelengths thatthe solid state light source emit and which produces a light levelsignal representative of a level of light in the external environmentfor wavelengths primarily outside of the emitted light band ofwavelengths, and a microcontroller operably coupled to the at least onephotosensor to receive the light level signal representative of a levelof light in the external environment for wavelengths primarily outsideof the emitted light band of wavelengths, the microcontroller operableto select an operating mode of the luminaire based at least in part onthe light level signal and to produce a control signal to control anoperation of the one or more solid state light sources based at least inpart on the selected operating mode of the photocontroller.

A method of operation of a photocontroller, for use with a luminaire andone or more solid state light sources that cumulatively emit lightacross an emitted light band of wavelengths, the photocontrollerincluding at least one photosensor positioned to detect light in anexternal environment that is external to the luminaire and responsiveprimarily to wavelengths of light outside the emitted light band ofwavelengths that the solid state light source emit, and amicrocontroller communicatively coupled to the at least one photosensor.The method may be summarized as including: producing, by the at leastone photosensor, a light level signal representative of a level of lightin the external environment primarily for wavelengths outside of theemitted light band of wavelengths; receiving, by the microcontroller,the light level signal representative of a level of light in theexternal environment primarily for wavelengths outside of the emittedlight band of wavelengths; selecting an operating mode of the luminairebased at least in part on the light level signal representative of alevel of light in the external environment primarily for wavelengthsoutside of the emitted light band of wavelengths; and producing acontrol signal to control an operation of the one or more solid statelight sources based at least in part on the selected operating mode ofthe photocontroller.

The method may further include, in the selecting of the operating modeof the photocontroller based at least in part on the light level signalrepresentative of the level of light in the external environmentprimarily for wavelengths outside of the emitted light band ofwavelengths, determining, by the microcontroller, a current light sensorlevel category based at least in part on the light level signalrepresentative of the level of light in the external environmentprimarily for wavelengths outside of the emitted light band ofwavelengths; retrieving, from the memory of the microcontroller, acurrent designated temporal state from a set of defined temporal states;selecting the operating mode of the photocontroller based at least inpart on the current light sensor level category and the currentdesignated temporal state from a set of defined temporal states; anddetermining, and storing in the memory of the microcontroller, asubsequent designated temporal state, from the set of defined temporalstates, based at least in part on the current light sensor levelcategory and the current designated temporal state from the set ofdefined temporal states.

The method may further include computing a time of day based at least inpart on the light level signal; recalibrating a real time clock of theluminaire based on the computed time of day; and using the real timeclock to control operation of the one or more solid state light sourcesin an event of failure of the photocontroller.

A method of operation of a system to control one or more solid statelight sources that cumulatively emit light across an emitted light bandof wavelengths when in an ON state, the system comprising at least onephotosensor responsive primarily to wavelengths of light outside theemitted light band of wavelengths that the one or more solid state lightsources emit when the one or more solid state light sources are in theON state and a set of circuitry communicatively coupled to the at leastone photosensor to receive the light level signal representative of thesensed level of light. The method may be summarized as including:producing, by the at least one photosensor, a light level signalrepresentative of a level of sensed light primarily for wavelengthsoutside of the emitted light band of wavelengths; determining, by theset of circuitry, a contribution by the one or more solid state lightsources to the sensed level of light as sensed by the at least onephotosensor; and assessing, by the set of circuitry, using a compensatedlight level or a compensated threshold, at least one of a dusk conditionor a dawn condition when the solid state light sources are in the ONstate, where the compensated light level or the compensated thresholdcompensate for the contribution by the one or more solid state lightsources to the sensed level of light as sensed by the at least onephotosensor.

The method may further include assessing, by the set of circuitry, usingan uncompensated light level or an uncompensated threshold, at least oneof the dusk condition or the dawn condition when the solid state lightsources are in the OFF state. In the determining the contribution by theone or more solid state light sources to the sensed level of light assensed by the at least one photosensor, the method further includecomparing, by the set of circuitry, a level of light sensed during afirst period of time in at least one diurnal cycle with the solid statelights sources in the ON state with a level of light sensed during asame period of time as the first period of time in at least one diurnalcycle with the solid state light sources in an OFF state. In thedetermining the contribution by the one or more solid state lightsources to the sensed level of light as sensed by the at least onephotosensor, the method further include: storing, by the set ofcircuitry, a plurality of values that represent a respective level oflight sensed when the solid state lights sources are in the ON state;comparing a level of light sensed when the solid state lights sourcesare in the ON state with a level of light sensed when the solid statelight sources are in an OFF state; and storing at least one value thatrepresents the contribution by the one or more solid state light sourcesto the sensed level of light as sensed by the at least one photosensor.The method may further include subtracting, by the set of circuitry,from the sensed level of light the stored value that represents thecontribution by the one or more solid state light sources to the sensedlevel of light as sensed by the at least one photosensor. The method mayfurther include increasing, by the set of circuitry, at least one of adusk threshold or a dawn threshold by the stored value that representsof the contribution by the one or more solid state light sources to thesensed level of light as sensed by the at least one photosensor.

A method of operation of a photocontroller for use with a luminaire andone or more solid state light sources that cumulatively emit lightacross an emitted light band of wavelengths, the photocontrollercomprising at least one photosensor positioned to detect light in anexternal environment that is external to the luminaire and responsiveprimarily to wavelengths of light outside the emitted light band ofwavelengths that the solid state light source emit, and amicrocontroller communicatively coupled to the at least one photosensor.The method may be summarized as including: producing, by the at leastone photosensor, a light level signal representative of a level of lightin the external environment primarily for wavelengths outside of theemitted light band of wavelengths; receiving, by the microcontroller,the light level signal representative of a level of light in theexternal environment primarily for wavelengths outside of the emittedlight band of wavelengths; periodically storing in memory, by themicrocontroller, a value of the light level signal received while theone or more solid state light sources are in a first state, the firststate being one of an OFF state and an ON state; determining a visiblelight correction value by computing a difference between theperiodically stored value of the light level signal received while theone or more solid state light sources are in the first state and a valueof the light level signal received while the one or more solid statelight sources are in a second state, the second state being an oppositeone of the OFF state and the ON state; selecting an operating mode ofthe photocontroller based at least in part on the light level signalrepresentative of the level of light in the external environmentprimarily for wavelengths outside of the emitted light band ofwavelengths and the determined visible light correction value; andproducing a control signal to control an operation of the one or moresolid state light sources based at least in part on the selectedoperating mode of the photocontroller.

The method may further include, in the selecting of the operating modeof the photocontroller based at least in part on the light level signalrepresentative of the level of light in the external environmentprimarily for wavelengths outside of the emitted light band ofwavelengths and the determined visible light correction value:determining, by the microcontroller, a corrected light level signal bysubtracting the determined visible light correction value from the lightlevel signal representative of the level of light in the externalenvironment primarily for wavelengths outside of the emitted light bandof wavelengths; determining, by the microcontroller, a current lightsensor level category based at least in part on: (i) the light levelsignal representative of the level of light in the external environmentprimarily for wavelengths outside of the emitted light band ofwavelengths, while the one or more solid state light sources are in theOFF state; and (ii) the corrected light level signal, while the one ormore solid state light sources are in the ON state; retrieving, from thememory of the microcontroller, a current designated temporal state froma set of defined temporal states; selecting the operating mode of thephotocontroller based at least in part on the current light sensor levelcategory and the current designated temporal state from a set of definedtemporal states; and determining, and storing in the memory of themicrocontroller, a subsequent designated temporal state, from the set ofdefined temporal states, based at least in part on the current lightsensor level category and the current designated temporal state from theset of defined temporal states.

The method may further include, in the selecting of the operating modeof the photocontroller based at least in part on the light level signalrepresentative of the level of light in the external environmentprimarily for wavelengths outside of the emitted light band ofwavelengths and the determined visible light correction value:determining a set of corrected light level threshold values by addingthe determined visible light correction value to a set of light levelthreshold values stored in the memory of the photocontroller;determining, by the microcontroller, a current light sensor levelcategory based at least in part on comparing the light level signalrepresentative of the level of light in the external environmentprimarily for wavelengths outside of the emitted light band ofwavelengths to: (i) the set of light level threshold values stored inthe memory of the photocontroller, while the one or more solid statelight sources are in the OFF state; and (ii) the set of corrected lightlevel threshold values, while the one or more solid state light sourcesare in the ON state; retrieving, from the memory of the microcontroller,a current designated temporal state from a set of defined temporalstates; selecting the operating mode of the photocontroller based atleast in part on the current light sensor level category and the currentdesignated temporal state from a set of defined temporal states; anddetermining, and storing in the memory of the microcontroller, asubsequent designated temporal state, from the set of defined temporalstates, based at least in part on the current light sensor levelcategory and the current designated temporal state from the set ofdefined temporal states.

The method may further include wherein said periodic storing in memory,by the microcontroller, of the value of the light level signal receivedwhile the one or more solid state light sources are in the first stateis performed only if there has been at least one instance, within apreceding 24 hours, of the microcontroller changing the one or moresolid state light sources from the first state to the second state, orthe second state to the first state.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

In the drawings, identical reference numbers identify similar elementsor acts. The sizes and relative positions of elements in the drawingsare not necessarily drawn to scale. For example, the shapes of variouselements and angles are not necessarily drawn to scale, and some ofthese elements are arbitrarily enlarged and positioned to improvedrawing legibility. Further, the particular shapes of the elements asdrawn, are not necessarily intended to convey any information regardingthe actual shape of the particular elements, and have been solelyselected for ease of recognition in the drawings.

FIG. 1 shows a decorative luminaire with a diffusing globe in which ascrew-in retrofit lamp is installed, according to at least oneillustrated implementation.

FIG. 2 shows a circuit diagram of a photocontroller which includes aphotosensor and a microcontroller, according to at least one illustratedimplementation.

FIG. 3 is a plot of a photosensor responsivity spectrum, according to atleast one illustrated implementation.

FIG. 4 shows the optical spectrum of light emitted by a white-light LEDused as a luminaire light source, according to at least one illustratedimplementation.

FIG. 5 is a block diagram of a hardware and software architecture forprocessing photosensor readings to obtain a day or night signal based ona software state machine, according to at least one illustratedimplementation.

FIG. 6 depicts a defined set of light sensor level categories which areindicative of specific times of day, according to at least oneillustrated implementation.

FIG. 7 is a table representing operation of the software state machine,according to at least one illustrated implementation.

FIG. 8 represents photosensor data recorded over time to be used tocalculate the solar time of day.

FIG. 9 is a flow diagram of a method of operation of a system to controlone or more solid state light sources that cumulatively emit lightacross an emitted light band of wavelengths when in an ON state.

FIG. 10 is a flow diagram of a method of operation of a photocontroller,including selection of an operating mode based on a light level signaland a visible light correction value.

DETAILED DESCRIPTION

Disclosed embodiments provide a photocontroller for a lamp which is tobe installed inside a globe (i.e., refractor or lens) of a luminaire.The photocontroller can measure outside ambient light levels as theychange from daytime to nighttime, and vice versa, and provide a stableday or night control signal without substantial interference from thelight produced by the luminaire. The lamp may include one or more lightssources, e.g., solid state light sources, such as light emitting diodes(LED). The lamp may be used to replace a high intensity discharge (HID)lamp, or similar lamp, to retrofit an existing decorative outdoorluminaire.

In disclosed embodiments, software of the photocontroller may provide astate machine to determine the day/night control signal during dusk anddawn periods to prevent the luminaire from flickering and/or repeatedlyturning on and off due to ephemeral fluctuations in light levels. Anaspect of the state machine is that once the day/night control signalhas changed (e.g., from day to night or vice versa), no further controlsignal changes will occur until the light level has moved outside atwilight light level range associated with periods in which night timelight conditions transition into day time light conditions (i.e., dawn)and day time light conditions transition into night time lightconditions (i.e., dusk). The light levels defined as dusk and dawn maybe set using threshold values determined based on, for example, desiredlighting characteristics for a particular lighting use or installedenvironment.

FIG. 1 shows a decorative luminaire 100 with a diffusing globe 110(i.e., refractor) in which a lamp 120 having a self-contained housing125 is installed. The lamp may be shaped and sized, and may have somecomponents in common with, e.g., an Evluma (Renton, Wash.) OmniMax™ LEDdecorative luminaire replacement lamp, which is an omnidirectional LEDreplacement lamp for high-intensity discharge (HID) decorative outdoorlight fixtures. In implementations, the lamp 120 emulates the lightcenter and pattern of a legacy HID bulb. A lamp 120 of this type may bean easy to install, screw-in lamp which is self-ballasted and whichprovides energy and maintenance savings.

In implementations, incoming ambient light 130 having longer wavelengthspasses through the glass or plastic globe 110 and strikes alonger-wavelength ambient light sensor 140 via a port 145 (e.g., anopening covered with a plastic lens) in the housing 125. The lamp 120may have an arrangement of LED sources 150 (which may encircle thecylindrically-shaped housing 125 and which may be covered by atranslucent window) having relatively shorter wavelengths. The light 155emitted by the LED sources 150 undergoes internal reflections in theglobe 110 and also illuminates the longer-wavelength ambient lightsensor 140 via the port 145 but is not detected by the ambient lightsensor 140, as explained in further detail below.

FIG. 2 shows a circuit diagram of a photocontroller 200 which includes aphotosensor 210 and a microcontroller 220. In implementations, thephotosensor 210 may be a phototransistor Q200 with a visible lightblocking filter, e.g., the SML-810 TB reverse mount type phototransistor(Rohm Co., Ltd.). The phototransistor Q200 serves as a main component ofthe photosensor 210 by outputting a current from its source in responseto received ambient light. There may be more than one photosensor 210 inparticular embodiments. The source of the phototransistor Q200 isconnected to ground through a bias resistor R200, thereby producing anoutput voltage at the junction 215 of the source of the phototransistorQ200 and the resistor R200. The voltage output of the phototransistorQ200 is higher in response to higher ambient light levels and is alsohigher in a particular frequency range, e.g., in the 750 nm to 1100 nmwavelength range.

In implementations, the at least one photosensor 210 is positioned todetect ambient light 130 (see FIG. 1), i.e., light in an environmentthat is external to the luminaire 100. For example, the at least onephotosensor 210 may be positioned at or near a port 145 in the housing125 of the lamp 120—the photocontroller 200 circuitry being containedwithin the lamp housing 125—to detect ambient light 130 which passesthrough the globe 110 of the luminaire 100 from the externalenvironment, i.e., the environment outside the globe 110 of theluminaire 100. In alternative embodiments, the at least one photosensor210 may be positioned on the exterior of the lamp housing 125—orelsewhere within the globe 110—so that a port 145 is not required. Forexample, the at least one photosensor 210 may be positioned on anappendage or surface extending from the lamp 120. As explained infurther detail below, the at least one photosensor 210 may be responsiveprimarily to wavelengths of light outside the emitted light band ofwavelengths that the solid state light sources emit, e.g., LED sources150, and may produce a light level signal representative of a level oflight in the external environment primarily for wavelengths outside ofthe emitted light band of wavelengths.

In implementations, the phototransistor Q200 may form part of a set oflight level detection circuitry, which may include one or moreprocessors, for example the microcontroller 220 depicted in FIG. 2 (or amicroprocessor) with an analog or digital interface to the photosensor210, and firmware processor-executable instructions or data stored onone or more non-transitory processor-readable media. The microcontroller220 may be implemented as a single integrated circuit, with one or moreof the following features: a central processing unit (CPU), volatilememory, e.g., random access memory (RAM), for data storage, read-onlymemory (ROM) for program and operating parameter storage, serialinput/output such as serial ports (UARTs), analog-to-digital converters,digital-to-analog converters, and in-circuit programming and debuggingsupport. Thus, the microcontroller 220 may be considered to be amicroprocessor or CPU integrated with various other functionalities. Oneof ordinary skill in the art would understand that the functions of themicrocontroller 220 could be performed by a single microcontroller chipor by a microcontroller or microprocessor in conjunction with one ormore communicatively-coupled chips and/or sets of circuitry.

Execution of the firmware processor-executable instructions or data maycause the microcontroller 220 to determine, inter alia, if lightdetected in the ambient environment is above or below one or more lightlevel thresholds. In embodiments, the photosensor 210 may include asolid state device, such as, for example, a photodiode, aphototransistor, or other photo-sensitive semiconductors, with orwithout amplifier circuitry, to produce voltage or current levels to becompared to the one or more thresholds. In embodiments, the photosensor210 may use filtered cadmium sulfide photoresistors.

FIG. 3 is an example plot of a photosensor responsivity spectrum for thephototransistor Q200 which shows that the phototransistor Q200 isprimarily sensitive to a range of longer wavelengths, e.g., longer thanwavelengths emitted by the LED sources 150. Specifically, thephototransistor Q200 has a responsivity range with a lower cutoff atabout 750 nm such that, below that wavelength, the relative intensity ofthe photosensor responsivity (plotted in FIG. 3 in arbitrary units [a.u.]) drops off sharply. The precise cutoff wavelength is not importantfor proper performance of the photocontroller, as discussed in furtherdetail below. In implementations, the photo sensor may have anassociated, or built-in, optical filter to produce the cutoff in theresponsivity spectrum. In particular embodiments, a photosensor may havehigher sensitivity to longer wavelength light due to its internalcharacteristics, without the addition of an external optical filter.

In implementations, the lower cutoff wavelength may be determined byreferring to a specification sheet for the particular photosensor or byconsidering a range on the photosensor responsivity spectrum in whichthe relative intensity is at about 50% or more of its peak. In theexample depicted in FIG. 3, a wavelength of about 750 nm can be deemedthe lower cutoff wavelength of the range. Based on this determination,it may be said that the photosensor is primarily responsive towavelengths greater than about 750 nm. Therefore, the photosensor isresponsive primarily to wavelengths of light outside the emitted lightband of wavelengths that the solid state light source emit, as discussedin further detail below.

As a practical matter, given the sharp cutoff of the responsivityspectrum, there may be implementations in which the relative intensityat a wavelength below about 750 nm, e.g., 749 nm, may be high (e.g.,greater than about 50%) if, for example, the actual responsivityspectrum were to be shifted downward in wavelength by about 1 nm fromthe example depicted. However, such a shift would not have a significanteffect on performance of the photocontroller because the light intensityoutput by the solid state light sources typically has a relativelygradual downward slope in this wavelength region (see discussion of FIG.4). Alternatively, if the light intensity output by the solid statelight sources were to have a sharp cutoff, it would be selected to besufficiently separated in wavelength from the cutoff wavelength of thephotosensor to avoid detection of a significant amount of light from thesolid state light sources by the photosensor (e.g., an intensity greaterthan about 50%).

FIG. 4 shows the optical spectrum of light emitted by a white-light LEDused as a luminaire light source. In the example depicted, substantiallyall of the spectrum being below about 750 nm—the relative power outputof the solid state light source is less than about 0.1 at thatwavelength. Therefore, the phototransistor Q200 is substantiallyinsensitive to the shorter wavelengths emitted by the white LED, i.e.,it is responsive primarily to wavelengths of light outside the emittedlight band of wavelengths that the solid state light source emits.

Referring again to FIG. 2, in implementations, the photosensor 210 maybe mounted on an LED off-line driver board and the output of thephotosensor 210, e.g., the output voltage at the junction 215 of thesource of the phototransistor Q200 and the bias resistor R200, may becommunicatively coupled to an analog input 230 of the microcontroller220 (which may be as a Bluetooth wireless module). In implementations,the microcontroller 220 may be, e.g., a BL652 series Bluetooth v5+nearfield communication (NFC) wireless module (Laird PLC), which is based onthe Nordic Semiconductor nRF52832 Bluetooth Low Energy (BLE) chipset.The BL652 modules are supported with an event-driven programminglanguage that enables development of an embedded application inside theBL652 hardware. In implementations, the output of the photosensor 210may be input to an analog input 230 (e.g., SIO_02/AINO) which functionsas an analog-to-digital converter (ADC) having configurable input andreference pre-scaling and sample resolution (e.g., 8, 10, and 12 bit).

In disclosed embodiments, the microcontroller 220 digitizes the voltagelevel across bias resistor R200, which is indicative of the output ofthe photosensor 210, and compares the resulting digital value to one ormore threshold values. The result of the comparison is used to controlthe operation of the lamp 120. To do so, the microcontroller 220 mayoutput a control signal to a set of circuitry which performs, e.g., aswitching operation to control a power input, or other control input, ofthe lamp 120. In addition, the microcontroller 220 may use the ambientlight level, so measured, to dim or brighten the output of the lamp 120,e.g., by outputting a signal to dimming inputs of the lamp 120 (or to aset of circuitry connected to the dimming inputs), so that the lightoutput changes in accordance with a determined function and/or algorithmrelative to the ambient light level. Other embodiments may use afrequency or pulse-width output signal from a photo-integrated circuitwhich is sensitive to longer or shorter wavelengths than primarilyemitted by the lamp 120. In such a case, the frequency, period, pulsewidth or other digital value may be compared to one or more digitalvalues representing one or more threshold values for day or night. Inother embodiments, transistor or integrated circuit comparators may beused to detect, e.g., daytime or nighttime external light conditions bycomparing the voltage across bias resistor R200 with one or morethreshold voltages or currents.

For implementations in which the luminaire 100 contains a retrofit LEDreplacement bulb powered by a legacy photo-control, the system maymonitor the time of day of actuation of the photocontroller 200 using areal time clock. Approximately at each day-to-night or night-to-dayactuation, the digitized photosensor values may be stored innon-volatile memory to be used by control algorithms to establishswitching thresholds in the event of external photo-control failure.

In embodiments, a photosensor 210 (with or without an optical filter)may be used which has some sensitivity to the longest and shortestwavelengths emitted by the lamp 120, provided the energy contained inthose wavelengths is not such that it causes the photocontroller 210 tofalsely detect daytime when it is nighttime. In embodiments, the systemmay have hysteresis in either the software or hardware, such that thelamp 120 will have a different threshold for detecting nighttime when itis daytime versus daytime being detected when it is nighttime. The useof hysteresis may reduce optical and electrical noise susceptibility bythe photocontroller.

In embodiments, the system stores minimum and maximum daily photosensorvalues each day, which are averaged over time and used to revise thethresholds as outside environmental changes occur, such as aging of theglobe 110 (i.e., refractor or lens), loss or gain of nearby foliage,changes in nearby artificial light sources, and other changes occurringover time. For example, a decorative globe 110 made of polycarbonateresin may become less transparent with age, thereby transmitting lowerambient light values. In such a case, adjustment of the thresholds inview of the lower photosensor levels may provide more accurate turn-onand turn-off times, so that the outside ambient light level, e.g., about4 foot-candles, remains closer to the optimal level for turning on oroff the luminaire light output.

Embodiments may include a second, visible ambient light sensor 142,included in the housing 125 of the lamp 120, which has higherresponsivity in the visible wavelengths emitted by LED light sources150, in addition to the longer wavelength ambient light sensor 140discussed above (the visible ambient light sensor 142 may receive lightvia the same port 145 as the longer wavelength ambient light sensor140). During daytime external light conditions, both light sensors wouldmeasure high levels of natural ambient light. During nighttime externallight conditions, only the visible ambient light sensor 142 would detecthigh levels of light emitted by the LED light sources 150 in the lamp120. In such a case, the visible ambient light sensor 142 can be used todetect malfunction of the light sources 150 and/or control electronics.For example, during the daytime, the longer wavelength ambient lightsensor 140 would measure the approximate level of natural light and thevisible wavelength ambient light sensor 142 would measure the naturalambient light level. In the case of a “day burner” failure, the visiblewavelength ambient light sensor 142 would measure the sum of the naturallight and the light emitted from the light sources 150 of the lamp 120due to the hypothetical control failure. In other words, if the lightsources 150 of the lamp 120 are in the ON state during the daytime, thisstate can be detected by subtracting the natural light detected by thelonger wavelength ambient light sensor 140 from the total light measuredby the visible ambient light sensor 142.

In embodiments, the visible ambient light sensor 142 and the longerwavelength ambient light sensor 140 may be used to roughly calculate thelevel of yellowing, haze, and dirt accumulated over time on a plasticluminaire globe 110. To do so, the ambient light level in the visiblewavelengths is measured when the lamp 120 is turned off, i.e., switchedto the OFF state, and stored in non-volatile memory. The longerwavelength light level is recorded at approximately the same time of dayand stored in non-volatile memory. Over time the ratio of visible tolonger-wavelength light may become smaller as the plastic globe 110begins to absorb more visible light than longer-wavelength light duringthe aging process. To counteract this effect, the output light level ofthe light sources 150 in the lamp 120 may be increased over time to keepthe light emitted from the luminaire 100 relatively constant over thelife of the globe 110 of the luminaire 100.

FIGS. 5-7 depict a photocontroller system, including software, to reducethe sensitivity of the system to normal changes in natural light levelsdue to clouds, passing automobiles, and other temporary causes.Optically-filtered photocontrollers may more accurately represent thehuman eye response curve, and also may give some immunity to reflectedluminaire light from snow accumulation or foliage outside of theluminaire, but are not necessarily well suited for ephemeralenvironmental changes.

FIG. 5 is a block diagram of a hardware and software architecture forprocessing photosensor readings to obtain a day or night control signalbased on a software state machine. In implementations, the photosensor510 may be an integrated photocell which is integrated into the retrofitLED lamp 120 installed in the luminaire 100 (see FIG. 1). In thearrangement depicted, the output (e.g., voltage output) from thephotosensor 510 is input to a processor running software having thearchitecture of a software state machine 520. As discussed in furtherdetail below, as the photosensor 510 input fluctuates, specificallyprogrammed transitions occur in the software state machine 520 which, inturn, define an output signal 530 indicative of day or night operationof the luminaire.

FIG. 6 depicts a defined set of light sensor level categories which areindicative of specific times of day and, hence, specific operating modesof the photocontroller and luminaire. The set of defined light sensorlevels may correspond to a set of threshold values obtained from thesoftware running on a processor of the photocontroller and/or stored ina memory of the photocontroller. Measured light levels obtained from thephotosensor may be compared to the set of threshold values to categorizethe received light level into one of the defined light sensor levelcategories, e.g., bright, light gray, dark gray, and dark. Receivedlight levels in the bright and light gray categories correspond to dayoperation of the photocontroller and luminaire in which the luminaire(or, in implementations, the lamp which is installed in the luminaireglobe) is in the OFF state. Received light levels in the dark gray anddark categories correspond to night operation of the photocontroller andluminaire in which the luminaire is in the ON state. Received lightlevels in the light gray and dark gray categories correspond to dawn ordusk periods in which the operation of the photocontroller and luminaireis susceptible to fluctuations between day and night operation due toephemeral changes in environmental conditions.

FIG. 7 is a table representing operation of the software state machinerunning on a processor, and using memory of, the photocontroller. In astate machine architecture, the operation mode of the photocontrollerdepends on both the received light level reading and a currentlydesignated state from among a set of defined states. In such aconfiguration, the correspondence between the received light levelreadings and the operation mode of the photocontroller and luminaire isnot fixed. Rather, the correspondence depends on events occurring in thepast, i.e., the events which have led to the state machine being in thecurrently designated state. Thus, in effect, the state machine is ableto evaluate a transition from a past light level reading to a currentreceived light level reading, rather than relying solely on the currentreceived light level reading.

In a stateless software model, by way of comparison, there is a fixedcorrespondence between received light level readings and the resultingoperation mode of the photocontroller. For example, bright or light graylight level readings always correspond to day operation and dark graywork dark light level readings always correspond to night operation.Therefore, the correspondence does not depend on events occurring in thepast.

In implementations, the state machine periodically samples thephotosensor output voltage and assigns it to one of a set of definedtemporal states (e.g., a set of four temporal states as depicted in thetable of FIG. 7). In such a case, the state machine always has adetermined “current state” which is one of the set of defined temporalstates. For example, a first temporal state may be defined as “stableday,” which is indicative of a daytime light level, i.e., a highreceived light level, which has not yet begun to transition to anighttime light level (i.e., has not begun to approach the dusk period).A second temporal state may be defined as “stable night,” which isindicative of a nighttime light level, i.e., a low received light level,which has not yet begun to transition to a daytime light level (i.e.,has not begun to approach the dawn period). A third temporal state maybe defined as “newly day,” which is indicative of a light leveltransitioning from night to day, but which is still in the dawn period.A fourth temporal state may be defined as “newly night,” which isindicative of a light level transitioning from day to night, but whichis still in the dusk period.

In the example of FIG. 7, the four defined temporal states—each of whichmay be designated as the current state—each correspond to a row in thestate table of the state machine, while the defined set of four lightsensor level categories each correspond to a column in the state table.This configuration results in a set of 16 possible state transitions,including combinations of current state and received light level readingwhich do not result in a change in the current state (e.g., when abright light level is received while the current state is “stable day”).

Thus, the state machine periodically evaluates the current light levelin the context of the current state. The result of the evaluation is theoutput signal indicating day or night. The evaluation may also result ina change of the current state. As noted above, an aspect of the statemachine is that once the day/night control signal has changed (e.g.,from day to night or vice versa), no further control signal changes willoccur until the light level has moved outside the twilight range.

For example, as dusk) approaches, a current state of “stable day”remains the current state, and the photocontroller continues to “signalday,” as the light level reading passes from “bright” to “light gray.”After the light level changes to “dark gray,” the current state changesto “newly night” and the photocontroller begins to “signal night.” Insuch a case, if the light level were to fluctuate between “dark gray”and “light gray,” the photocontroller would continue to “signal night.”Thus, after the photocontroller begins to “signal night” at dusk), thesystem remains in the “signal night” mode of operation as the lightlevel changes to “dark” (at which point the current state changes to“stable night”).

Similarly, as dawn approaches, a current state of “stable night” remainsthe current state, and the photocontroller continues to “signal night,”as the light level reading passes from “dark” to “dark gray.” After thelight level changes to “light gray,” the current state changes to “newlyday” and the photocontroller begins to “signal day.” In such a case, ifthe light level were to fluctuate between “light gray” and “dark gray,”the photocontroller would continue to “signal day.” Thus, after thephotocontroller begins to “signal day” at dawn, the system remains inthe “signal day” mode of operation as the light level changes to“bright” (at which point the current state changes to “stable day”).

FIG. 8 is a graphic representation of photosensor data recorded overtime to be used to calculate the solar time of day. Specifically, theplot shows ambient light level (e.g., in arbitrary units) detected by aphotosensor which is sensitive to longer (and/or shorter) wavelengthsthan emitted by white LEDs versus time (e.g., in days). Recorded data ofthis type may be used to recalibrate a real time clock (RTC) implementedin software executed in the luminaire, which is used in the event of thefailure of a primary photocontroller or contactor. The use of a softwareRTC eliminates the need for the luminaire to include a hardware RTC, asthe microcontroller running the software RTC typically has an accurateenough crystal for many days of operation (versus many years ofoperation in the case of a precision hardware RTC). Such animplementation also eliminates the need for the luminaire to include abattery, which would typically be used with a hardware RTC to ensurethat the correct time remains set even if, for example, the luminairehas been stored in a warehouse for several months before being poweredon.

The recorded data are analyzed to find a specified reference time ofday, such as solar midnight, to use in adjusting the RTC time so that itwill correctly read midnight when solar midnight occurs (e.g., bycomputing a current time from the determined reference time and thenadjusting the RTC if it differs from the computed current time). Therecorded photosensor data is typically fairly noisy due to environmentaleffects, such as, for example, clouds passing over, rainy days, etc.Therefore, software-based filtering, smoothing, and/or analysis may beused to clean up the data to find the true solar time of day. Forexample, smoothing and filtering may be applied to the recorded data,followed by application of a peak search algorithm to find the locationsof the peaks and troughs of the light intensity, as described in furtherdetail below. Such an implementation enables use of a commercial gradecrystal—despite the typical temperature drift and inaccuracy—inconjunction with the RTC calculations being done in the microcontrollerinstead of being obtained from a hardware RTC. If the power fails, orthe luminaire is disconnected, at least one day of operation to gatherambient light data is performed to set the RTC to at least anapproximately correct time of day.

In implementations, the microcontroller 220 receives signals from thephotosensor 210 (or photosensors) which are indicative of levels oflight sensed in the external environment. The microcontroller 220 maystore information in memory, and/or to nonvolatile storage media,related to or indicative of the sensed levels of illumination. Ananalog-to-digital converter input of the microcontroller 220 maydigitize the signals before further processing by the microcontroller220. The microcontroller 220 can store the information so as tocorrelate or create logical relationships between the sensed levels anda time (e.g., real time) as indicated by the real time clock (RTC). Themicrocontroller 220 can use the information to determine times asindicated by the RTC (i.e., in the temporal reference frame of theclock) with the solar cycle for any daily cycle, and to control thelight sources accordingly.

In implementations, the microcontroller 220 may determine the times asindicated by the clock at which a time of dusk and/or time of dawn occurbased at least in part on the information stored in the nonvolatilestorage media and/or memory. For example, the microcontroller 220 maydetermine the times at which solar midnight (i.e., average or medianminimum light or illumination levels) and solar noon (i.e., average ormedian maximum light or illumination levels) occur, and set a time ofdusk and/or time of dawn to be at the times which are midway between thetime of dusk and/or time of dawn. Also for example, the microcontroller220 may determine the times at which a particular rate of change occurs.For instance, the microcontroller 220 may determine the times at which amaximum rate of change occurs or when a minimum rate of change occurs.The times of maximum rate of change may correspond to the midpointsbetween solar midnight and solar noon, and may be set as the time ofdusk and the time of dawn. The microcontroller 220 may determine adirection of change, for example whether the light or illumination levelis increasing or decreasing. The microcontroller 220 may use such tomatch or relate the times of maximum rate of change respectively withsolar midnight and solar noon. For instance, a time of maximum rate ofchange which occurs while the light or illumination level is increasingwould indicate dawn, while a time of maximum rate of change which occurswhile the light or illumination level is decreasing would indicate dusk.Relying on rate of change and direction may advantageously allow themicrocontroller 220 determine the diurnal cycle in a relatively shortperiod of time as compared to other approaches.

FIG. 9 shows a method 900 of operation of a system to control one ormore solid state light sources that cumulatively emit light across anemitted light band of wavelengths when in an ON state. The systemoperated according to this method 900 includes or is communicativelycoupled to at least one photosensor responsive primarily to wavelengthsof light outside the emitted light band of wavelengths that the one ormore solid state light sources emit when the one or more solid statelight sources are in the ON state. The system also includes a set ofcircuitry (e.g., microcontroller, digital and/or analog circuitry)communicatively coupled to the at least one photosensor to receive thelight level signal representative of the sensed level of light.

At 910, the at least one photosensor produces a light level signalrepresentative of a level of sensed light primarily for wavelengthsoutside of the emitted light band of wavelengths. At 920, the set ofcircuitry determines a contribution by the one or more solid state lightsources to the sensed level of light as sensed by the at least onephotosensor. At 925, the set of circuitry determines whether the solidstate light sources are in the ON state or the OFF state. If the solidstate light sources are in the ON state, control passes to 930, while ifthe solid state light sources are in the OFF state control passes to940.

At 930, the set of circuitry assesses a dusk condition or a dawncondition using a compensated light level or a compensated threshold.The compensated light level or the compensated threshold compensates forthe contribution by the one or more solid state light sources to thesensed level of light as sensed by the at least one photosensor.

At 940, the set of circuitry assesses a dusk condition or a dawncondition using an uncompensated light level or an uncompensatedthreshold.

To determine the contribution by the one or more solid state lightsources to the sensed level of light (920), the set of circuitry maycompare (e.g., subtract): a level of light sensed at a first time in atleast one diurnal cycle with the solid state lights sources in the ONstate with a level of light sensed during a second time in the at leastone diurnal cycle with the solid state light sources in an OFF state,where the second time is within a defined period (e.g., 5 seconds, 30seconds, 1 minute, 2 minutes, 5 minutes) of time of the first time. Suchmay occur during a same diurnal cycle. Alternatively, to determine thecontribution by the one or more solid state light sources to the sensedlevel of light (920), the set of circuitry may compare (e.g., subtract):a level of light sensed during a first relative period of time (e.g., 2PM) in a first diurnal cycle with the solid state lights sources in theON state with a level of light sensed during a same period of time(e.g., 2 PM) as the first period of time in second diurnal cycle withthe solid state light sources in an OFF state, where the first diurnalcycle and the second diurnal cycle immediately adjacent one another(e.g., one day and the following day).

Alternatively or additionally, the set of circuitry may store aplurality of values that represent a respective level of light sensedwhen the solid state lights sources are in the ON state and/or store aplurality of values that represent a respective level of light sensedwhen the solid state lights sources are in the OFF state. Where valuesthat represent a respective level of light sensed when the solid statelights sources are in the ON and the OFF state, the stored values shouldinclude an indication of whether they represent or correspond to asampling in the ON state or the OFF state. For example, one portion ofmemory or one vector of stored values may be dedicated to ON statesamples, while another portion of memory or a second vector of storedvalues are dedicated to OFF state samples.

The set of circuitry may store one or more values that represent (e.g.,proportional) the determined contribution by the one or more solid statelight sources to the sensed level of light. In some implementations, theset of circuitry may subtract the value of the determined contributionfrom a current value of the sensed level of light to produce acompensated sensed level of light before assessing a dusk condition or adawn condition, using the compensated sensed level of light duringperiods when the solid state light sources are in the ON state and usingan uncompensated sensed level of light when the solid state lightsources are in the OFF state. In some implementations, the set ofcircuitry may adjust at least one of a dusk threshold or a dawnthreshold, for example by adding the value of the determinedcontribution to a dusk threshold or a dawn threshold to produce acompensated dusk threshold and/or compensated dawn threshold beforeassessing a dusk condition or a dawn condition, using the compensateddusk threshold and/or compensated dawn threshold during periods when thesolid state light sources are in the ON state and using an uncompensateddusk threshold and/or uncompensated dawn threshold when the solid statelight sources are in the OFF state.

FIG. 10 shows a method 1000 of operation of a photocontroller, includingselection of an operating mode based on a light level signal and avisible light correction value. As in the embodiments above, thephotocontroller is for use with a luminaire and one or more solid statelight sources that cumulatively emit light across an emitted light bandof wavelengths. The photocontroller includes a photosensor positioned todetect light in the environment external to the luminaire and responsiveprimarily to wavelengths of light outside the emitted light band ofwavelengths that the solid state light source emit. The photocontrolleralso includes a microcontroller communicatively coupled to thephotosensor. As a practical matter, as noted above, the photosensor maydetect some amount of visible light. Therefore, a visible lightcorrection value is determined and used to control the solid state lightsources, as described in further detail below.

The visible light correction value is determined based on differencesbetween light level measurements made while the solid state lightsources are in the ON state and the OFF state. In at least someimplementations, the ON-state and OFF-state light level values used inthe determination of the visible light correction value are measuredwithin a short time window (e.g., under 1 minute) to avoid possibleinaccuracies due to fluctuating visible light in the environment. Forexample, the ON-state and OFF-state light level values may be measuredjust as the solid state light sources switch from the OFF state to theON state, or vice versa. This ON/OFF switching typically occurs twice ina 24 hour period—at dusk and dawn. To determine the visible lightcorrection value in this manner at other times of the 24 hour cycle, itwould be necessary to perform an undesirable blinking of the solid statelight sources during an operational period, i.e., during a period of thenight or day in which the solid state light sources were meant to beconstantly in an ON state or an OFF state, respectively.

In implementations, light level measurements performed by thephotocontroller are periodically stored while the solid state lightsources are in the OFF state (i.e., during the day). When the solidstate light sources are switched to the ON state (i.e., at dusk), theperiodically stored OFF-state light level measurement is retrieved andused to determine the visible light correction value. The computedvisible light correction value is used during the subsequent operationalperiod while the solid state light sources are in the ON state (i.e.,during the night), as this is when the photosensor potentially receivesvisible light from the solid state light sources.

At 1010, the at least one photosensor produces a light level signalrepresentative of a level of light in the external environment primarilyfor wavelengths outside of the emitted light band of wavelengths. At1020, the microcontroller receives light level signal. At 1030, it isdetermined whether the one or more solid state light sources (e.g.,LEDs) are in the OFF state (i.e., not in the ON state), and if in theOFF state the microcontroller at 1040 periodically stores the value ofthe received light level in memory. This stored value is used as areference, i.e., baseline, value because the photosensor does notreceive any contribution of visible light from the solid state lightsources while the solid state light sources are in the OFF state. Thestoring of the reference value (1040) may, for example, be repeatedperiodically until the solid state light sources are switched to the ONstate.

In at least some implementations, the periodic storing in memory of thevalue of the light level signal received while the solid state lightsources are in the OFF state may be performed only if thephotocontroller is functioning properly. For example, the storing may beperformed only if there has been at least one instance, within apreceding 24 hours, of the microcontroller changing the solid statelight sources from the ON state to the OFF state, or from the OFF stateto the ON state.

At 1050, the microcontroller determines a visible light correctionvalue, for example by subtracting the periodically stored value of thelight level signal received while the solid state light sources were inthe OFF state from a value of the light level signal received while thesolid state light sources are in the ON state. This determineddifference provides a measure of the visible light received by thephotosensor contributed by the solid state light sources. In at leastsome implementations, the microcontroller may be operable to change thesolid state light sources from the OFF state to the ON state based on anassessment of a dusk condition using a light level signal compensated bya visible light correction value determined in a previous iteration ofthe method 1000.

In at least some implementations, light level measurements performed bythe photocontroller are periodically stored while the solid state lightsources are in the ON state (i.e., during the night). The stored lightlevel values are used as a reference for a received light level whichincludes visible light, because the photosensor potentially receivesvisible light from the solid state light sources while they are in theON state. A visible light correction value may be determined by takingthe periodically stored value of the light level signal received whilethe solid state light sources were in the ON state and subtracting avalue of the light level signal received while the solid state lightsources are in the OFF state. This computed difference provides ameasure of the visible light received by the photosensor from the solidstate light sources. The computed visible light correction value may beused during a subsequent operational period while the solid state lightsources are in the ON state (e.g., during the following night), as thisis when the photosensor potentially receives visible light from thesolid state light sources.

At 1060, the microcontroller determines an operating mode of thephotocontroller, which may, for example, be selected based at least inpart on the received light level signal representative of the level oflight in the external environment primarily for wavelengths outside ofthe emitted light band of wavelengths (which may include some amount ofvisible light) and the determined visible light correction value. In theselection of the operating mode, a corrected light level signal isdetermined by subtracting the determined visible light correction valuefrom the received light level signal. Thus, the corrected light levelsignal is the received light level signal adjusted to account for thevisible light received by the photosensor from the solid state lightsources. The corrected light level signal is applicable only when thesolid state light sources are in the ON state, because that is whenvisible light is potentially being received by the photosensor.Therefore, a current light sensor level category is determined based atleast in part on the received light level signal (i.e., the uncorrectedlight level signal) while the solid state light sources are in the OFFstate and based at least in part on the corrected light level signalwhile the solid state light sources are in the ON state. At 1070, themicrocontroller produces a control signal to control an operation of thesolid state light sources based at least in part on the selectedoperating mode of the photocontroller in a manner similar to thatdiscussed above with respect to other embodiments.

In alternative embodiments, rather than determining a corrected lightlevel signal, a corrected set of light level threshold values may bedetermined by subtracting the determined visible light correction valuefrom a set of light level threshold values stored in the memory of thephotocontroller. The corrected light level threshold values areapplicable only when the solid state light sources are in the ON state.Therefore, a current light sensor level category is determined based atleast in part on comparing the light level signal representative of thelevel of light in the external environment primarily for wavelengthsoutside of the emitted light band of wavelengths (which may include someamount of visible light) to: (i) the set of light level threshold valuesstored in the memory of the photocontroller, while the one or more solidstate light sources are in the OFF state; and (ii) the set of correctedlight level threshold values, while the one or more solid state lightsources are in the ON state. As noted above, at 1070, themicrocontroller produces a control signal to control an operation of thesolid state light sources based at least in part on the selectedoperating mode of the photocontroller in a manner similar to thatdiscussed above with respect to other embodiments.

The various implementations and embodiments described above can becombined to provide further implementations and embodiments. All of thecommonly assigned US patent application publications, US patentapplications, foreign patents, and foreign patent applications referredto in this specification and/or listed in the Application Data Sheet,including but not limited to: U.S. Provisional Patent Application No.61/052,924, filed May 13, 2008; U.S. Pat. No. 8,926,138, issued Jan. 6,2015; PCT Publication No. WO2009/140141, published Nov. 19, 2009; U.S.Provisional Patent Application No. 61/051,619, filed May 8, 2008; U.S.Pat. No. 8,118,456, issued Feb. 21, 2012; PCT Publication No.WO2009/137696, published Nov. 12, 2009; U.S. Provisional PatentApplication No. 61/088,651, filed Aug. 13, 2008; U.S. Pat. No.8,334,640, issued Dec. 18, 2012; U.S. Provisional Patent Application No.61/115,438, filed Nov. 17, 2008; U.S. Provisional Patent Application No.61/154,619, filed Feb. 23, 2009; U.S. Patent Publication No.2010/0123403, published May 20, 2010; U.S. Patent Publication No.2016/0021713, published Jan. 21, 2016; PCT Publication No.WO2010/057115, published May 20, 2010; U.S. Provisional PatentApplication No. 61/174,913, filed May 1, 2009; U.S. Pat. No. 8,926,139,issued Jan. 6, 2015; PCT Publication No. WO2010/127138, published Nov.4, 2010; U.S. Provisional Patent Application No. 61/180,017, filed May20, 2009; U.S. Pat. No. 8,872,964, issued Oct. 28, 2014; U.S. PatentPublication No. 2015/0015716, published Jan. 15, 2015; PCT PublicationNo. WO2010/135575, published Nov. 25, 2010; U.S. Provisional PatentApplication No. 61/229,435, filed Jul. 29, 2009; U.S. Patent PublicationNo. 2011/0026264, published Feb. 3, 2011; U.S. Provisional PatentApplication No. 61/295,519, filed Jan. 15, 2010; U.S. Provisional PatentApplication No. 61/406,490, filed Oct. 25, 2010; U.S. Pat. No.8,378,563, issued Feb. 19, 2013; PCT Publication No. WO2011/088363,published Jul. 21, 2011; U.S. Provisional Patent Application No.61/333,983, filed May 12, 2010; U.S. Pat. No. 8,541,950, issued Sep. 24,2013; PCT Publication No. WO2010/135577, published Nov. 25, 2010; U.S.Provisional Patent Application No. 61/346,263, filed May 19, 2010; U.S.Pat. No. 8,508,137, issued Aug. 13, 2013; U.S. Pat. No. 8,810,138,issued Aug. 19, 2014; U.S. Pat. No. 8,987,992, issued Mar. 24, 2015; PCTPublication No. WO2010/135582, published Nov. 25, 2010; U.S. ProvisionalPatent Application No. 61/357,421, filed Jun. 22, 2010; U.S. Pat. No.9,241,401, granted Jan. 19, 2016; PCT Publication No. WO2011/163334,published Dec. 29, 2011; U.S. Pat. No. 8,901,825, issued Dec. 2, 2014;U.S. Patent Publication No. 2015/0084520, published Mar. 26, 2015; PCTPublication No. WO2012/142115, published Oct. 18, 2012; U.S. Pat. No.8,610,358, issued Dec. 17, 2013; U.S. Provisional Patent Application No.61/527,029, filed Aug. 24, 2011; U.S. Pat. No. 8,629,621, issued Jan.14, 2014; PCT Publication No. WO2013/028834, published Feb. 28, 2013;U.S. Provisional Patent Application No. 61/534,722, filed Sep. 14, 2011;U.S. Pat. No. 9,312,451, issued Apr. 12, 2016; PCT Publication No.WO2013/040333, published Mar. 21, 2013; U.S. Provisional PatentApplication No. 61/567,308, filed Dec. 6, 2011; U.S. Pat. No. 9,360,198,issued Jun. 7, 2016; U.S. Provisional Patent Application No. 61/561,616,filed Nov. 18, 2011; U.S. Patent Publication No. 2013/0141010, publishedJun. 6, 2013; PCT Publication No. WO2013/074900, published May 23, 2013;U.S. Provisional Patent Application No. 61/641,781, filed May 2, 2012;U.S. Patent Publication No. 2013/0293112, published Nov. 7, 2013; U.S.Patent Publication No. 2013/0229518, published Sep. 5, 2013; U.S.Provisional Patent Application No. 61/640,963, filed May 1, 2012; U.S.Patent Publication No. 2013/0313982, published Nov. 28, 2013; U.S.Patent Publication No. 2014/0028198, published Jan. 30, 2014; U.S. Pat.No. 9,801,248, issued Oct. 24, 2017; PCT Publication No. WO2014/018773,published Jan. 30, 2014; U.S. Provisional Patent Application No.61/723,675, filed Nov. 7, 2012; U.S. Pat. No. 9,301,365, issued Mar. 29,2016; U.S. Provisional Patent Application No. 61/692,619, filed Aug. 23,2012; U.S. Patent Publication No. 2014/0055990, published Feb. 27, 2014;U.S. Provisional Patent Application No. 61/694,159, filed Aug. 28, 2012;U.S. Pat. No. 8,878,440, issued Nov. 4, 2014; U.S. Patent PublicationNo. 2014/0062341, published Mar. 6, 2014; U.S. Patent Publication No.2015/0077019, published Mar. 19, 2015; PCT Publication No.WO2014/039683, published Mar. 13, 2014; U.S. Provisional PatentApplication No. 61/728,150, filed Nov. 19, 2012; U.S. Patent PublicationNo. 2014/0139116, published May 22, 2014; U.S. Pat. No. 9,433,062,issued Aug. 30, 2016; PCT Publication No. WO2014/078854, published May22, 2014; U.S. Provisional Patent Application No. 61/764,395, filed Feb.13, 2013; U.S. Pat. No. 9,288,873, issued Mar. 15, 2016; U.S.Provisional Patent Application No. 61/849,841, filed Jul. 24, 2013; U.S.Patent Publication No. 2015/0028693, published Jan. 29, 2015; PCTPublication No. WO2015/013437, published Jan. 29, 2015; U.S. ProvisionalPatent Application No. 61/878,425, filed Sep. 16, 2013; U.S. PatentPublication No. 2015/0078005, published Mar. 19, 2015; PCT PublicationNo. WO2015/039120, published Mar. 19, 2015; U.S. Provisional PatentApplication No. 61/933,733, filed Jan. 30, 2014; U.S. Pat. No.9,185,777, issued Nov. 10, 2015; PCT Publication No. WO2015/116812,published Aug. 6, 2015; U.S. Provisional Patent Application No.61/905,699, filed Nov. 18, 2013; U.S. Pat. No. 9,414,449, issued Aug. 9,2016; U.S. Pat. No. 9,781,797, issued Oct. 3, 2017; U.S. ProvisionalPatent Application No. 62/068,517, filed Oct. 24, 2014; U.S. ProvisionalPatent Application No. 62/183,505, filed Jun. 23, 2015; U.S. Pat. No.9,445,485, issued Sep. 13, 2016; PCT Publication No. WO2016/064542,published Apr. 28, 2016; U.S. Provisional Patent Application No.62/082,463, filed Nov. 20, 2014; U.S. Publication No. 2016/0150369,published May 26, 2016; PCT Publication No. WO2016/081071, published May26, 2016; U.S. Provisional Patent Application No. 62/057,419, filed Sep.30, 2014; U.S. Publication No. 2016/0095186, published Mar. 31, 2016;PCT Publication No. WO2016/054085, published Apr. 7, 2016; U.S.Provisional Patent Application No. 62/114,826, filed Feb. 11, 2015; U.S.Non-provisional patent application Ser. No. 14/939,856, filed Nov. 12,2015; U.S. Provisional Patent Application No. 62/137,666, filed Mar. 24,2015; U.S. Non-provisional patent application Ser. No. 14/994,569, filedJan. 13, 2016; U.S. Non-provisional patent application Ser. No.14/844,944, filed Sep. 3, 2015; U.S. Provisional Patent Application No.62/208,403, filed Aug. 21, 2015; U.S. Non-provisional patent applicationSer. No. 15/238,129, filed Aug. 16, 2016; U.S. Provisional PatentApplication No. 62/264,694, filed Dec. 8, 2015; U.S. Non-provisionalpatent application Ser. No. 15/369,559, filed Dec. 5, 2016; U.S.Provisional Patent Application No. 62/397,709, filed Sep. 21, 2016; U.S.Non-provisional patent application Ser. No. 15/709,022, filed Sep. 19,2017; U.S. Provisional Patent Application No. 62/397,713, filed Sep. 21,2016; U.S. Non-provisional patent application Ser. No. 15/709,028, filedSep. 19, 2017; U.S. Provisional Patent Application No. 62/327,939, filedApr. 26, 2016; U.S. Non-provisional patent application Ser. No.15/496,985, filed Apr. 25, 2017; U.S. Provisional Patent Application No.62/379,037, filed Aug. 24, 2016; U.S. Non-provisional patent applicationSer. No. 15/681,927, filed Aug. 21, 2017; U.S. Provisional PatentApplication No. 62/458,970, filed Feb. 14, 2017; U.S. Non-provisionalpatent application Ser. No. 15/895,439, filed Feb. 13, 2018; U.S.Provisional Patent Application No. 62/480,833, filed Apr. 3, 2017; U.S.Non-provisional patent application Ser. No. 15/943,183, Apr. 2, 2018;U.S. Provisional Patent Application No. 62/507,730, filed May 17, 2017;U.S. Non-provisional patent application Ser. No. 15/980,978, filed May16, 2018; U.S. Non-provisional patent application Ser. No. 15/799,744,filed Oct. 31, 2017; U.S. Provisional Patent Application No. 62/669,883,filed May 10, 2018; U.S. Provisional Patent Application No. 62/701,392,filed Jul. 20, 2018; U.S. patent application Ser. No. 16/517,137, filedJul. 19, 2019 (now published as US2020/0029404); U.S. patent applicationSer. No. 16/842,924, filed Apr. 8, 2020; U.S. patent application62/864,121, filed Jun. 20, 2019; and U.S. patent application 63/010,412,filed Apr. 15, 2020, are each incorporated herein by reference, in theirentirety. These and other changes can be made to the embodiments inlight of the above-detailed description.

The various embodiments described above can be combined and/or modifiedto provide further embodiments in light of the above-detaileddescription, including the material incorporated by reference. Ingeneral, in the following claims, the terms used should not be construedto limit the claims to the specific implementations disclosed in thespecification and the claims, but should be construed to include allpossible implementations along with the full scope of equivalents towhich such claims are entitled. Accordingly, the claims are not limitedby the disclosure.

1. A photocontroller for use with a luminaire and one or more solidstate light sources that cumulatively emit light across an emitted lightband of wavelengths, the photocontroller comprising: at least onephotosensor positioned to detect light in an external environment thatis external to the luminaire and responsive primarily to wavelengths oflight outside the emitted light band of wavelengths that the one or moresolid state light sources emit when the one or more solid state lightsources are in an ON state, the at least one photosensor which producesa light level signal representative of a level of light in the externalenvironment primarily for wavelengths outside of the emitted light bandof wavelengths; a microcontroller communicatively coupled to the atleast one photosensor to receive the light level signal representativeof a level of light in the external environment primarily forwavelengths outside of the emitted light band of wavelengths, themicrocontroller operable to determine an external light condition basedat least in part on the light level signal and to produce a controlsignal to control an operation of the one or more solid state lightsources based at least in part on the determination of the externallight condition.
 2. The photocontroller of claim 1 wherein themicrocontroller changes a state of the control signal to change the oneor more solid state light sources from the ON state to an OFF state, orfrom the OFF state to the ON state.
 3. The photocontroller of claim 1wherein a responsivity spectrum of the photosensor is primarily atwavelengths above about 750 nm.
 4. The photocontroller of claim 1wherein a responsivity spectrum of the photosensor is primarily atwavelengths above wavelengths of visible light.
 5. The photocontrollerof claim 1 wherein the photocontroller comprises an optical filter toblock from the photosensor light in the external environment primarilyfor wavelengths of light inside the emitted light band of wavelengths.6. The photocontroller of claim 1 wherein the photosensor comprises aphototransistor communicatively coupled to output a current from asource in response to received ambient light, the source being connectedto ground through a resistor to produce an output voltage at thejunction of the source and the resistor.
 7. The photocontroller of claim6 wherein the output voltage of the photosensor is communicativelycoupled to an analog-to-digital converter input of the microcontroller.8. The photocontroller of claim 7 wherein the microcontroller isoperable to determine a digital value, representing a received lightlevel, based at least in part on analog-to-digital conversion of theoutput voltage of the photosensor received by the analog-to-digitalconverter input of the microcontroller, and the microcontroller isfurther operable to perform a comparison of the received light level toa stored switching threshold.
 9. The photocontroller of claim 8 whereinthe microcontroller is operable to output the control signal to controlthe one or more solid state light sources based at least in part on thecomparison of the digital value representing the received light level tothe stored switching threshold.
 10. The photocontroller of claim 9wherein the microcontroller is operable to store in memory minimum andmaximum values of the digital value representing the received lightlevel at actuations of the one or more solid state light sources by thecontrol signal, and to determine a revised switching threshold based onthe stored minimum and maximum values.
 11. The photocontroller of claim1 wherein the at least one photosensor comprises a first ambient lightsensor having a first responsivity spectrum, a substantial portion ofwhich is at wavelengths longer than a wavelength range of visible light,and a second ambient light sensor having a second responsivity spectrumwhich includes wavelengths in the wavelength range of visible light. 12.The photocontroller of claim 11 wherein the microprocessor is operableto compare a light level detected by the first ambient light sensor to alight level detected by the second ambient light sensor to detect adaytime activation failure.
 13. The photocontroller of claim 1 whereinthe microcontroller is operable to compare the light level signalrepresenting the level of light in the environment external to a set oflight level threshold values stored in a memory of the photocontrollerto determine a current light sensor level category.
 14. Thephotocontroller of claim 13 wherein, based at least in part on thecurrent light sensor level category and a current designated temporalstate from a set of defined temporal states, the microcontroller isoperable to: select an operating mode of the photocontroller; anddesignate a subsequent temporal state from the set of defined temporalstates.
 15. The photocontroller of claim 14 wherein the currentdesignated temporal state corresponds to a temporal period from a set oftemporal periods comprising: dawn, day, dusk, and night.
 16. Thephotocontroller of claim 14 wherein the selected operating mode of thephotocontroller is from a set comprising: a day operating mode and anight operating mode.
 17. The photocontroller of claim 1 wherein themicrocontroller is operable to: compute a time of day based at least inpart on the light level signal; recalibrate a real time clock of theluminaire based on the computed time of day; and use the real time clockto control operation of the one or more solid state light sources in anevent of failure of the photocontroller.
 18. The photocontroller ofclaim 17 wherein, to compute the time of day based at least in part onthe light level signal, the microcontroller is operable to: store inmemory a plurality of values of the light level signal; analyze thestored plurality of values of the light level signal to determine aspecified reference time of day; and compute a current time of day basedon the determined specified reference time of day.
 19. Thephotocontroller of claim 1 wherein the microcontroller is furtheroperable to: determine a value that represents a contribution of the oneor more solid state light sources to the light detected by the at leastone photosensor, where the contribution occurs when the one or morelight sources are in the ON state; and adjust operation to accommodatefor the contribution of the one or more solid state light sources to thelight detected by the at least one photosensor.
 20. The photocontrollerof claim 1 wherein the microcontroller is further operable to: determinea contribution by the one or more solid state light sources to thesensed level of light as detected by the at least one photosensor, and,to use a compensated light level or a compensated threshold in assessingat least one of a dusk condition or a dawn condition when the solidstate light sources are in the ON state, where the compensated lightlevel or the compensated threshold are compensate for the contributionby the one or more solid state light sources to the sensed level oflight as detected by the at least one photosensor.
 21. Thephotocontroller of claim 1 wherein the microcontroller is furtheroperable to: to maintain a state of the one or more light sources atleast until the level of light in the external environment leaves adefined range.
 22. A lamp for use in a luminaire having a socket,comprising: a housing having an exterior, an interior, and a base tocommunicatively couple to the socket of the luminaire; one or more solidstate light sources that cumulatively emit light across an emitted lightband of wavelengths when the one or more solid state light sources arein an ON state; a photocontroller to control operation of the one ormore solid state light sources, the photocontroller comprising a set ofcircuitry housed in the interior of the housing, the set of circuitryincluding: at least one photosensor positioned to detect light in anexternal environment that is external to the luminaire and responsiveprimarily to wavelengths of light outside the emitted light band ofwavelengths that the solid state light source emit and which produces alight level signal representative of a level of light in the externalenvironment for wavelengths primarily outside of the emitted light bandof wavelengths, and a microcontroller operably coupled to the at leastone photosensor to receive the light level signal representative of alevel of light in the external environment for wavelengths primarilyoutside of the emitted light band of wavelengths, the microcontrolleroperable to select an operating mode of the photocontroller based atleast in part on the light level signal and to produce a control signalto control an operation of the one or more solid state light sourcesbased at least in part on the selected operating mode of thephotocontroller.
 23. (canceled)
 24. (canceled)
 25. The lamp of claim 22wherein the microcontroller is further operable to: determine a valuethat represents a contribution of the one or more solid state lightsources to the light detected by the at least one photosensor, where thecontribution occurs when the one or more light sources are in the ONstate; and adjust operation to accommodate for the contribution of theone or more solid state light sources to the light detected by the atleast one photosensor.
 26. The lamp of claim 22 wherein themicrocontroller is further operable to: determine a contribution by theone or more solid state light sources to the sensed level of light asdetected by the at least one photosensor, and, to use a compensatedlight level or a compensated threshold in assessing at least one of adusk condition or a dawn condition when the solid state light sourcesare in the ON state, where the compensated light level or thecompensated threshold are compensate for the contribution by the one ormore solid state light sources to the sensed level of light as detectedby the at least one photosensor.
 27. A method of operation of aphotocontroller for use with a luminaire and one or more solid statelight sources that cumulatively emit light across an emitted light bandof wavelengths, the photocontroller comprising at least one photosensorpositioned to detect light in an external environment that is externalto the luminaire and responsive primarily to wavelengths of lightoutside the emitted light band of wavelengths that the solid state lightsource emit, and a microcontroller communicatively coupled to the atleast one photosensor, the method comprising: producing, by the at leastone photosensor, a light level signal representative of a level of lightin the external environment primarily for wavelengths outside of theemitted light band of wavelengths; receiving, by the microcontroller,the light level signal representative of a level of light in theexternal environment primarily for wavelengths outside of the emittedlight band of wavelengths; selecting an operating mode of thephotocontroller based at least in part on the light level signalrepresentative of a level of light in the external environment primarilyfor wavelengths outside of the emitted light band of wavelengths; andproducing a control signal to control an operation of the one or moresolid state light sources based at least in part on the selectedoperating mode of the photocontroller.
 28. (canceled)
 29. The method ofclaim 27 wherein, in determining the current light sensor levelcategory, the light level signal representative of the level of light inthe external environment primarily for wavelengths outside of theemitted light band of wavelengths is compared to a set of light levelthreshold values stored in the memory of the photocontroller. 30.(canceled)
 31. (canceled)
 32. The method of claim 27, furthercomprising: determining a value that represents a contribution of theone or more solid state light sources to the light detected by the atleast one photosensor, where the contribution occurs when the one ormore light sources are in the ON state; and adjusting operation toaccommodate for the contribution of the one or more solid state lightsources to the light detected by the at least one photosensor.
 33. Themethod of claim 27, further comprising: determining a contribution bythe one or more solid state light sources to the sensed level of lightas detected by the at least one photosensor, and, assessing at least oneof a dusk condition or a dawn condition when the solid state lightsources are in the ON state based at least in part on a compensatedlight level or a compensated threshold, where the compensated lightlevel or the compensated threshold are compensate for the contributionby the one or more solid state light sources to the sensed level oflight as detected by the at least one photosensor. 34.-44. (canceled)